home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 11445 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.1 KB  |  34 lines

  1. Newsgroups: comp.lang.c++
  2. Path: news.spb.su!demos!pluscom!usenet
  3. From: sergeyp@albea.ugatu.ac.ru (Sergey Pavlov)
  4. Subject: Re: Help creating 32-bit .DLL
  5. X-Newsreader: Forte Free Agent 1.0.82
  6. Sender: usenet@news.rinet.ru (Vladimir Sharpai)
  7. Nntp-Posting-Host: albea.ugatu.ac.ru
  8. Organization: Albea
  9. Message-ID: <Do9n3E.5Lt@news.rinet.ru>
  10. References: <314594F3.DCC@mcimail.com>
  11. Date: Thu, 14 Mar 1996 16:30:39 GMT
  12.  
  13. "Michael P. Lascuola" <mlascuola@mcimail.com> wrote:
  14.  
  15. >Has anyone created a .DLL for Visual FoxPro 3.0?  I've been having a 
  16. >devil of a time.  I have created the .CPP program and created the .DLL 
  17. >using Borland  4.52, but Fox says "Cannot find entry point <function> in 
  18. >the DLL."
  19.  
  20. >Does anyone have any suggestions?  THANKS!
  21.  
  22. >        char* FAR PASCAL _export UseXLT(char * str);
  23.  
  24. >        char* FAR PASCAL _export UseXLT(char * str)
  25. >        {
  26. >        char *tempbuf;
  27. >        tempbuf = new char[256];
  28. >        sprintf(tempbuf, "%sNewValue", str);
  29. >        return (char *)tempbuf;
  30. >        }
  31. You need declare exported function as extern "C" and declare it in
  32. section EXPORT of DEF-file.
  33.  
  34.